package es.ikex.servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


public class AceptarCookies extends HttpServlet {
	private static final long serialVersionUID = 1L;

	
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		Cookie politicaCookies = new Cookie("politicaCookies", "acepta");
		politicaCookies.setMaxAge(60*60*24*61);
		politicaCookies.setPath("/");
		response.addCookie(politicaCookies);

		request.getRequestDispatcher("jsp/index.jsp").forward(request, response);
	}

}
